﻿using _001_MVVM基础.Model;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace _001_MVVM基础
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

            this.spStudentInfo.DataContext = new Student();
            this.spDogInfo.DataContext = new Dog();
        }

        //private void BtnSubmit_Click(object sender, RoutedEventArgs e)
        //{
        //    if (spStudentInfo.DataContext is Student student)
        //    {
        //        student.Id = 100;
        //    }
        //}
    }
}